/**
 * @author 小也
 * @create 2021/4/3 8:04
 */
public class SequentialSearch {
    public static void search(int[] arr,int x) {
        boolean has = false;
        for (int i : arr) {
            if(i == x){
                System.out.println("x存在");
                has = true;
                break;
            }
        }
        if (!has) {
            System.out.println("x不存在");
        }
    }
}
